<template>
  <div class="qrcode-form">
    <add-base-form v-if="opType === '1'">
      <el-form-item :label="$t('地址')">
        <el-input type="textarea"></el-input>
      </el-form-item>
      <el-form-item :label="$t('参数')">
        <el-row>
          <el-col :span="6">
            <el-select>
              <el-option v-for="(type) in typeOpts" :key="type.v" :value="type.v" :label="type.l"></el-option>
            </el-select>
          </el-col>
          <el-col :span="14">
            <el-select>
              <el-option v-for="(type) in typeOpts" :key="type.v" :value="type.v" :label="type.l"></el-option>
            </el-select>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <el-select>
              <el-option v-for="(type) in typeOpts" :key="type.v" :value="type.v" :label="type.l"></el-option>
            </el-select>
          </el-col>
          <el-col :span="6">
            <el-select>
              <el-option v-for="(type) in typeOpts" :key="type.v" :value="type.v" :label="type.l"></el-option>
            </el-select>
          </el-col>
          <el-col :span="6">
            <el-select>
              <el-option v-for="(type) in typeOpts" :key="type.v" :value="type.v" :label="type.l"></el-option>
            </el-select>
          </el-col>
        </el-row>
      </el-form-item>
      <el-form-item :label="$t('刷新间隔')">
        <el-time-picker>
        </el-time-picker>
      </el-form-item>
    </add-base-form>
    <edit-base-form v-else-if="opType === '2'">
      <el-form-item :label="$t('地址')">
        <el-input type="textarea"></el-input>
      </el-form-item>
      <el-form-item :label="$t('参数')">
        <el-row>
          <el-col :span="6">
            <el-select>
              <el-option v-for="(type) in typeOpts" :key="type.v" :value="type.v" :label="type.l"></el-option>
            </el-select>
          </el-col>
          <el-col :span="14">
            <el-select>
              <el-option v-for="(type) in typeOpts" :key="type.v" :value="type.v" :label="type.l"></el-option>
            </el-select>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <el-select>
              <el-option v-for="(type) in typeOpts" :key="type.v" :value="type.v" :label="type.l"></el-option>
            </el-select>
          </el-col>
          <el-col :span="6">
            <el-select>
              <el-option v-for="(type) in typeOpts" :key="type.v" :value="type.v" :label="type.l"></el-option>
            </el-select>
          </el-col>
          <el-col :span="6">
            <el-select>
              <el-option v-for="(type) in typeOpts" :key="type.v" :value="type.v" :label="type.l"></el-option>
            </el-select>
          </el-col>
        </el-row>
      </el-form-item>
      <el-form-item :label="$t('刷新间隔')">
        <el-time-picker>
        </el-time-picker>
      </el-form-item>
    </edit-base-form>
  </div>
</template>

<script>
import AddBaseForm from './AddBaseForm'
import EditBaseForm from './EditBaseForm'
export default {
  components: {
    AddBaseForm,
    EditBaseForm
  },
  props: {
    opType: {
      type: String,
      default: '1'
    }
  },
  data() {
    return {
      typeOpts: [
        {v: '股票', l: '股票'},
        {v: '汇率', l: '汇率'},
        {v: '利率', l: '利率'},
        {v: '期货', l: '期货'},
      ]
    }
  }
}
</script>

<style lang="scss" scoped>
  
</style>